package io.gitee.falllee.dao.model;

import io.gitee.falllee.dao.annotation.Column;
import io.gitee.falllee.dao.annotation.Table;

/**
 * 消息记录表
 * 
 * @author batty
 * @date 2024/08/19
 */
@Table(value = "message_record", cache = 2)
public class MessageRecord extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 服务名
     */
    private String service;

    /**
     * 服务ip
     */
    private String ip;

    /**
     * topic
     */
    private String topic;

    /**
     * key
     */
    private String key;

    /**
     * 状态(0:未消费;1:消费成功;2:消费失败)
     */
    private Integer status;

    /**
     * 花费时间(ms)
     */
    private Long cost;

    /**
     * 消息记录
     */
    private String record;

    /**
     * 错误信息
     */
    private String message;

    /**
     * 公司ID
     */
    private Long companyId;

    /**
     * 主键
     * 
     * @return id
     */
    @Column(value = "id", key = true, order = 1)
    public Long getId() {
        return id;
    }

    /**
     * 主键
     * 
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 服务名
     * 
     * @return service
     */
    @Column(value = "service", order = 2)
    public String getService() {
        return service;
    }

    /**
     * 服务名
     * 
     * @param service
     */
    public void setService(String service) {
        this.service = service == null ? null : service.trim();
    }

    /**
     * 服务ip
     * 
     * @return ip
     */
    @Column(value = "ip", order = 3)
    public String getIp() {
        return ip;
    }

    /**
     * 服务ip
     * 
     * @param ip
     */
    public void setIp(String ip) {
        this.ip = ip == null ? null : ip.trim();
    }

    /**
     * topic
     * 
     * @return topic
     */
    @Column(value = "topic", order = 4)
    public String getTopic() {
        return topic;
    }

    /**
     * topic
     * 
     * @param topic
     */
    public void setTopic(String topic) {
        this.topic = topic == null ? null : topic.trim();
    }

    /**
     * key
     * 
     * @return key
     */
    @Column(value = "key", order = 5)
    public String getKey() {
        return key;
    }

    /**
     * key
     * 
     * @param key
     */
    public void setKey(String key) {
        this.key = key == null ? null : key.trim();
    }

    /**
     * 状态(0:未消费;1:消费成功;2:消费失败)
     * 
     * @return status
     */
    @Column(value = "status", order = 6)
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态(0:未消费;1:消费成功;2:消费失败)
     * 
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 花费时间(ms)
     * 
     * @return cost
     */
    @Column(value = "cost", order = 7)
    public Long getCost() {
        return cost;
    }

    /**
     * 花费时间(ms)
     * 
     * @param cost
     */
    public void setCost(Long cost) {
        this.cost = cost;
    }

    /**
     * 消息记录
     * 
     * @return record
     */
    @Column(value = "record", order = 8)
    public String getRecord() {
        return record;
    }

    /**
     * 消息记录
     * 
     * @param record
     */
    public void setRecord(String record) {
        this.record = record == null ? null : record.trim();
    }

    /**
     * 错误信息
     * 
     * @return message
     */
    @Column(value = "message", order = 9)
    public String getMessage() {
        return message;
    }

    /**
     * 错误信息
     * 
     * @param message
     */
    public void setMessage(String message) {
        this.message = message == null ? null : message.trim();
    }

    /**
     * 公司ID
     * 
     * @return company_id
     */
    @Column(value = "company_id", order = 10)
    public Long getCompanyId() {
        return companyId;
    }

    /**
     * 公司ID
     * 
     * @param companyId
     */
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }
}